#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
public:
    vector<int> singleNumber(vector<int>& nums) {
        vector<int> v;
        unordered_map<int, int> hash;
        for (auto i : nums)
        {
            hash[i]++;
        }

        for (auto [key, val] : hash)
        {
            if (val == 1)  v.push_back(key);
        }

        return v;
    }
};